package org.microdream.easy.deploy.action;

import com.alibaba.fastjson.JSONArray;
import ice.server.comm.BaseAction;
import org.microdream.easy.deploy.service.DMenuService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/DMenu")
public class DMenuAction extends BaseAction {

    @Resource
    private DMenuService dMenuService;

    @GetMapping("getMenuTree")
    public JSONArray getMenuTree(){
        JSONArray jsonArray = dMenuService.getMenuTree();
        return jsonArray;
    }
}
